<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PyNest - A Modular Python Framework</title>
    <link rel="icon" href="imgs/pynest-logo.png" type="image/x-icon">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap" rel="stylesheet">
    <!-- Font Awesome for Icons -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
    <!-- Prism.js CSS -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
    <!-- Custom Styles -->
    <style>
        /* Reset */
        *, *::before, *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Roboto', sans-serif;
            background-color: #1E1E1E;
            color: #FFFFFF;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Header */
        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 50px;
            background-color: #121212;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
        }

        .header .logo {
            width: 50px;
        }

        .header nav {
            display: flex;
            align-items: center;
            margin-left: auto;
        }

        .header nav a {
            color: #FFFFFF;
            margin-left: 30px;
            text-decoration: none;
            font-size: 1em;
            transition: color 0.3s ease;
        }

        .header nav a:hover {
            color: #00B3E6;
        }

        /* Social Icons in Header */
        .header .social-icons {
            display: flex;
            align-items: center;
            margin-left: 30px;
        }

        .header .social-icons a {
            color: #FFFFFF;
            margin-left: 20px;
            font-size: 1.2em;
            transition: color 0.3s ease;
        }

        .header .social-icons a:hover {
            color: #00B3E6;
        }

        /* Hero Section */
        .hero {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #007acc 0%, #00b3e6 100%);
            padding: 180px 20px 100px 20px;
            text-align: center;
            position: relative;
            margin-top: 80px; /* Adjusted for fixed header */
        }

        .hero::after {
            content: '';
            background: url('imgs/hero-background.svg') no-repeat center center;
            background-size: cover;
            opacity: 0.05;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            position: absolute;
            z-index: -1;
        }

        .hero-content {
            max-width: 1000px;
            padding: 0 20px;
            animation: fadeInUp 1s ease-out;
        }

        .hero h1 {
            font-size: 6em;
            margin-bottom: 20px;
            font-weight: 700;
            font-family: 'Roboto', sans-serif;
            color: #FFFFFF;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            line-height: 1.1;
        }

        .hero p {
            font-size: 1.5em;
            margin-bottom: 40px;
            color: #f0f0f0;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }

        .hero .buttons {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
        }

        .hero .buttons a {
            text-decoration: none;
            margin: 10px;
            padding: 15px 30px;
            border-radius: 30px;
            font-size: 1.2em;
            transition: background 0.3s ease, transform 0.3s ease;
            display: inline-block;
        }

        .hero .buttons a.primary {
            background: #FFFFFF;
            color: #007acc;
        }

        .hero .buttons a.secondary {
            background: transparent;
            color: #FFFFFF;
            border: 2px solid #FFFFFF;
        }

        .hero .buttons a:hover {
            transform: translateY(-3px);
        }

        /* Features Section */
        .features {
            padding: 80px 50px;
            background-color: #1E1E1E;
            text-align: center;
        }

        .features h2 {
            font-size: 2.5em;
            margin-bottom: 40px;
            font-weight: 500;
        }

        .features-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 40px;
        }

        .feature-item {
            background-color: #2A2A2A;
            padding: 40px 30px;
            border-radius: 10px;
            width: 300px;
            transition: transform 0.3s ease;
        }

        .feature-item:hover {
            transform: translateY(-5px);
        }

        .feature-item i {
            font-size: 2.5em;
            margin-bottom: 20px;
            color: #00B3E6;
        }

        .feature-item h3 {
            font-size: 1.5em;
            margin-bottom: 15px;
            font-weight: 500;
        }

        .feature-item p {
            font-size: 1em;
            color: #CCCCCC;
        }

        /* Code Section */
        .code-section {
            padding: 80px 50px;
            background-color: #121212;
            text-align: left;
        }

        .code-section h2 {
            font-size: 2.5em;
            margin-bottom: 40px;
            font-weight: 500;
            color: #FFFFFF;
            text-align: center;
        }

        .code-block {
            position: relative;
            background-color: #1E1E1E;
            border-radius: 10px;
            overflow: hidden;
        }

        .code-block pre {
            margin: 0;
            padding: 20px;
            overflow-x: auto;
        }

        .copy-button {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #007acc;
            color: #FFFFFF;
            border: none;
            padding: 8px 12px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9em;
            transition: background 0.3s ease;
        }

        .copy-button:hover {
            background: #005f99;
        }

        /* Footer */
        .footer {
            background-color: #121212;
            padding: 40px 20px;
            text-align: center;
            color: #FFFFFF;
            font-size: 0.9em;
            margin-top: auto;
        }

        .social-icons {
            margin-bottom: 20px;
        }

        .social-icons a {
            color: #FFFFFF;
            margin: 0 10px;
            font-size: 1.5em;
            transition: color 0.3s ease;
        }

        .social-icons a:hover {
            color: #00B3E6;
        }

        /* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translate3d(0, 40px, 0);
            }

            to {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
        }

        /* Media Queries */
        @media (max-width: 1200px) {
            .hero h1 {
                font-size: 5em;
            }
        }

        @media (max-width: 992px) {
            .hero h1 {
                font-size: 4em;
            }
            .hero p {
                font-size: 1.3em;
            }
            .header nav a {
                margin-left: 20px;
            }
        }

        @media (max-width: 768px) {
            .header, .hero, .footer, .features, .code-section {
                padding: 20px;
            }

            .header nav {
                display: none; /* Hide navigation on mobile */
            }

            .header .social-icons {
                margin-left: auto;
            }

            .hero h1 {
                font-size: 3em;
            }

            .hero p {
                font-size: 1.2em;
            }

            .hero .buttons a {
                font-size: 1em;
            }

            .features-grid {
                flex-direction: column;
                align-items: center;
            }

            .feature-item {
                width: 100%;
            }

            .code-section h2 {
                font-size: 2em;
            }
        }

        @media (max-width: 576px) {
            .hero {
                padding: 150px 20px 80px 20px;
            }

            .hero h1 {
                font-size: 2.5em;
            }

            .hero p {
                font-size: 1em;
            }

            .header .logo {
                width: 40px;
            }
        }
    </style>
</head>
<body>
    <!-- Header -->
    <header class="header">
        <a href="/" aria-label="PyNest Home">
            <img src="imgs/pynest-logo.png" alt="PyNest Logo" class="logo">
        </a>
        <div class="social-icons">
            <a href="https://github.com/PythonNest/PyNest" target="_blank" aria-label="GitHub">
                <i class="fab fa-github"></i>
            </a>
            <a href="https://www.linkedin.com/company/pynest-api" target="_blank" aria-label="LinkedIn">
                <i class="fab fa-linkedin"></i>
            </a>
            <a href="https://medium.com/@itay2803" target="_blank" aria-label="Twitter">
                <i class="fab fa-medium-m"></i>
            </a>
        </div>
    </header>

    <!-- Hero Section -->
    <section class="hero">
        <div class="hero-content">
            <h1>PyNest</h1>
            <p>A modern, modular Python framework inspired by NestJS, built on top of FastAPI.</p>
            <div class="buttons">
                <a href="/PyNest/introduction" class="primary">Get Started</a>
                <a href="https://github.com/PythonNest/PyNest" class="secondary" target="_blank">GitHub</a>
            </div>
        </div>
    </section>

    <!-- Features Section -->
    <section class="features" id="features">
        <h2>Why Choose PyNest?</h2>
        <div class="features-grid">
            <div class="feature-item">
                <i class="fas fa-layer-group"></i>
                <h3>Modular Architecture</h3>
                <p>Organize your code into reusable modules for better scalability and maintainability.</p>
            </div>
            <div class="feature-item">
                <i class="fas fa-rocket"></i>
                <h3>Built on FastAPI</h3>
                <p>Leverage the speed and performance of FastAPI, one of the fastest Python web frameworks.</p>
            </div>
            <div class="feature-item">
                <i class="fas fa-code"></i>
                <h3>Type Safety</h3>
                <p>Enjoy robust type checking and autocomplete features with Python's type hints.</p>
            </div>
            <div class="feature-item">
                <i class="fas fa-users"></i>
                <h3>Community Driven</h3>
                <p>Join a growing community of developers contributing to the evolution of PyNest.</p>
            </div>
            <div class="feature-item">
                <i class="fas fa-plug"></i>
                <h3>Extensible</h3>
                <p>Easily integrate with various libraries and tools to extend functionality.</p>
            </div>
            <div class="feature-item">
                <i class="fas fa-shield-alt"></i>
                <h3>Secure</h3>
                <p>Implement best security practices with built-in support for authentication and authorization.</p>
            </div>
        </div>
    </section>

    <!-- Code Section -->
    <section class="code-section">
        <h2>Get Started with PyNest</h2>
        <div class="code-block">
            <button class="copy-button" onclick="copyCode()">Copy</button>
            <pre><code class="language-python">
from nest.core import PyNestFactory, Module, Controller, Get, Injectable

@Injectable()
class AppService:
    def __init__(self):
        self.app_name = "PyNest App"
        self.app_version = "1.0.0"

    def get_app_info(self):
        return {"app_name": self.app_name, "app_version": self.app_version}

@Controller("/")
class AppController:
    def __init__(self, app_service: AppService):
        self.app_service = app_service

    @Get("/")
    def get_app_info(self):
        return self.app_service.get_app_info()

@Module(controllers=[AppController], providers=[AppService])
class AppModule:
    pass

app = PyNestFactory.create(
    AppModule,
    description="This is my PyNest app.",
    title="PyNest Application",
    version="1.0.0",
    debug=True,
)

            </code></pre>
        </div>
    </section>

    <!-- Footer -->
    <footer class="footer">
        <div class="social-icons">
            <a href="https://github.com/PythonNest/PyNest" target="_blank" aria-label="GitHub">
                <i class="fab fa-github"></i>
            </a>
            <a href="https://www.linkedin.com/company/pynest-api" target="_blank" aria-label="LinkedIn">
                <i class="fab fa-linkedin"></i>
            </a>
            <a href="https://medium.com/@itay2803" target="_blank" aria-label="Twitter">
                <i class="fab fa-medium-m"></i>
            </a>
        </div>
        <p>&copy; 2024 PyNest</p>
        <p>Made with Material for MkDocs</p>
        <p>All rights reserved - Itay Dar</p>
    </footer>

    <!-- Prism.js JavaScript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/prism.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-python.min.js"></script>

    <!-- Copy Code Script -->
    <script>
        function copyCode() {
            const code = document.querySelector('.code-block pre code').innerText;
            navigator.clipboard.writeText(code).then(() => {
                alert('Code copied to clipboard!');
            }, (err) => {
                console.error('Could not copy text: ', err);
            });
        }
    </script>
</body>
</html>
